using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.IO;
using System.Reflection;
using System.Xml;

using IBatisNet.Common;
using IBatisNet.Common.Utilities;
using IBatisNet.DataMapper;
using IBatisNet.DataMapper.Configuration;

namespace Pg.BioMedics.SDR.Data
{
    /// <summary>
    /// Base data manager. This class provides iBatis support functionalit.
    /// All data managers should inherit from this class.
    /// </summary>
    public abstract class BaseDataManager
    {
        #region Fields

        IDataMapperStrategy _dataMapperStrategy;

        #endregion

        #region Constructors

        /// <summary>
        /// Makes data provider initialization - initialized data mapper strategy is applied for 
        /// data manager.
        /// </summary>
        /// <param name="dataMapperStrategy">Initialized data mapper strategy</param>
        protected BaseDataManager(IDataMapperStrategy dataMapperStrategy) 
        {
            _dataMapperStrategy = dataMapperStrategy;
        }

        #endregion

        #region Properties

        /// <summary>
        /// Sql mapper associated with resource provider
        /// </summary>
        protected ISqlMapper DataMapper
        {
            get
            {
                return _dataMapperStrategy.DataMapper;
            }
        }

        #endregion
    }
}